package com.imooc.o2o.enums;

import lombok.Getter;

/**
 * @author 徐老板
 * @date 2020/1/1   21:09
 */
@Getter
public enum ShopStateEnum {
    CHECK(0,"审核中"),OFFINE(-1,"非法店铺"),SUCCESS(1,"操作成功"),
    PASS(2,"通过认证"),INNER_ERROE(-1001,"内部系统错误"),
    NULL_SHOPID(-1002,"shopId为空"),NULL_SHOP(-1003,"shop信息为空");

    private int state;
    private String stateInfo;

    ShopStateEnum(int state, String stateInfo) {
        this.state = state;
        this.stateInfo = stateInfo;
    }

public static ShopStateEnum stateOf(int state){
    for (ShopStateEnum shopStateEnum :values() ) {
        if (shopStateEnum.getState()==state){
            return shopStateEnum;
        }
    }
    return null;
}
}
